package top.zhangjianyong.tools.utils;

import java.math.BigDecimal;

/**
 * @author ： zhangjianyong
 * @date ： 2022/10/17 11:36 AM
 */
public class MathUtil {

    public static double customLog(double base, double logNumber) {
        return Math.log(logNumber) / Math.log(base);
    }

    public static void main(String[] args) {
        double v = MathUtil.customLog(100, -77);
        System.out.println(v);
        if ( !Double.isNaN(v))
            System.out.println(new BigDecimal(v));
    }
}
